package cc.mrbird.febs.utils;

import lombok.Data;

import java.util.List;

@Data
public class PagingDTO {
    private Integer pageNo;
    private Integer pageSize;
    private Long total;
    private Integer totalPage;
    private List rows;

    public PagingDTO() {
    }

    public PagingDTO(Integer pageNo, Integer pageSize, Long total, List rows) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.total = total;
        this.totalPage = new Double(Math.ceil(total * 1.0 / pageSize)).intValue();
        this.rows = rows;
    }
}
